package application.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JOptionPane;

import application.Launcher;
import application.visual.DisconnectDialog;

public class DisconnectAction extends AbstractAction{

	public void actionPerformed(ActionEvent e) {
		
		if(Launcher.getMainFrame().getConnectedClients().size() > 0)
		{
			new DisconnectDialog().setVisible(true);
		}
		else 
			JOptionPane.showMessageDialog(null, "There aren't any clients connected.");
		
	}

}
